<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>输入内容</title>
</head>
<body>
<input id="user" type="text" placeholder="用户名">
<input id="email" type="text" placeholder="邮箱">
<input type="button" value="提交" onclick="getInfo()">

<ul id="view"></ul>

<script src="static/JavaScript/jquery-3.6.4.min.js"></script>
<script type="text/javascript">
    function getInfo() {
        var userName = $("#user").val();
        var email = $("#email").val();

        // alert("您好："+userName+"\n"+"邮箱为："+email);

        var ulTag = $("#view");

        // 创建标签$("<li>")
        var newLi001 = $("<li>").text("Username:" + userName);
        var newLi002 = $("<li>").text("Email:" + email);

        ulTag.append(newLi001);
        ulTag.append(newLi002);
    }
</script>

</body>
</html>